package com.hnhs.serviceimpl;

import com.hnhs.entity.User;
import com.hnhs.mapper.UserMapper;
import com.hnhs.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceimpl implements UserService {

    @Resource
    UserMapper userMapper;

    @Override
    public List<User> selectAll() {
        return userMapper.selectAll();
    }

    @Override
    public List<User> selectByName(String name) {
        return userMapper.selectByName(name);
    }

    @Override
    public Integer insert(User user) {
        return userMapper.insert(user);
    }
}
